import request from '@/utils/request'

/**
 * 部门配置表分页查询
 * @param {查询条件} data
 */
export function listDept(query) {
  return request({
    url: 'business/Dept/list',
    method: 'get',
    params: query,
  })
}

/**
 * 新增部门配置表
 * @param data
 */
export function addDept(data) {
  return request({
    url: 'business/Dept',
    method: 'post',
    data: data,
  })
}
/**
 * 修改部门配置表
 * @param data
 */
export function updateDept(data) {
  return request({
    url: 'business/Dept',
    method: 'PUT',
    data: data,
  })
}
/**
 * 获取部门配置表详情
 * @param {Id}
 */
export function getDept(id) {
  return request({
    url: 'business/Dept/' + id,
    method: 'get'
  })
}

/**
 * 删除部门配置表
 * @param {主键} pid
 */
export function delDept(pid) {
  return request({
    url: 'business/Dept/delete/' + pid,
    method: 'POST'
  })
}
